    <style>
        .formpost input{
            margin:15px auto;
            border:0;
            border-bottom: 1px solid black;
            border-color:#ccc;
            height:40px;
        }
    </style>
    <nav id="top" class="top">
        <div class="box">
            <div class="box_dao">
                <span>
                <img src="__STATIC__/assets/images/dizhi.png" alt="">
                <span style="color: #ed6560;">&nbsp;武汉站</span>
                <a href="">
                    <切换>
                </a>
                    
                <span>400-900-2355</span>
                </span>


                <span class="nav pull-right">

                {if condition="(!empty($phone))"}
                    <img src="__STATIC__/assets/images/zhanghu.png" alt="">
                    <a href="{:url('Core/index')}">我的账户</a>
                {else /}
                    {if condition="(!empty($seller_id))"}
                        <img src="__STATIC__/assets/images/zhanghu.png" alt="">
                        <a href="{:url('Core/index')}">我的账户</a>
                        <img src="__STATIC__/assets/images/dingdan.png" alt="">
                        <a href="{:url('Index/generate')}">生成订单</a>
                    {/if}
                {/if}

               
                    
               

                <span>
                    {if condition="(empty($phone) && empty($seller_id))"}
                        <a style="margin: 0;cursor:pointer" onclick="login()">登录</a>
                            <span>/</span>
                        <a style="margin: 0;cursor:pointer" onclick="register_to()">注册</a>
                    {else /}
                        {if condition="(!empty($phone))"}
                            <span style="color:#ED6560">欢迎您！</span>{$phone} <a style="margin: 0;cursor:pointer;color:red;" onclick="delselling()">注销！</a>
                        {else /}
                           {if condition="(!empty($seller_id))"}
                                <span style="color:#ED6560">欢迎您！</span>{$seller_id} <a style="margin: 0;cursor:pointer;color:red;" onclick="delselling()">注销！</a>
                            
                               
                            {/if}
                        {/if}

                       <!-- <span style="color:#ED6560">欢迎您！</span>{$phone} <a style="margin: 0;cursor:pointer;color:red;" onclick="delselling()">注销！</a> -->
                    {/if}
                    
                </span>
                </span>
            </div>
        </div>
        <div style="height: 50px;"></div>
        <div style="height: 100px;background: #000;">
            <div class="Navigation">

                <div class="logo"><img src="__STATIC__/assets/images/LOGO.png" alt=""></div>

                <div id="Navigation_content" class="Navigation_content">
                    <ul>
                        <li class="li_1">
                            <a href="{:url('Index/index')}">首页</a>
                        </li>
                        <li class="li_2">
                            <a href="{:url('Class/index')}">分类</a>
                        </li>
                        <li class="li_3">
                            <a href="{:url('House/index')}">晒家</a>
                        </li>
                        <li class="li_4">
                            <a href="{:url('Ferr/index')}">免息莫愁</a>
                        </li>
                        <li class="li_5">
                            <a href="{:url('About/index')}">关于我们</a>
                        </li>
                    </ul>
                </div>

                <div class="search_box">
                    <span class="glyphicon glyphicon-search"> 
                </div>               
                <div class="search_ssk">
                    <input id="ss_text" type="text"><a id="ssanniu">搜索</a>
                </div>
            
            </div>
        </div>

    </nav>
    <script>


    function delselling()
    {
        $.ajax({
             type: "POST",
             url:"{:url('Login/delselling')}",
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                if (msg == 1) {
                     layer.msg('已注销登入!',{icon: 1});
                     history.go(0); 
                }
                
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
    }

    function register_to()
    {
        layer.open({
          type: 1,
          title:'莫愁商城',
          skin: 'demo-class', //加上边框
          area: ['432px', '515px'], //宽高
          content: $('#register_form')
        });
    }


    function login(){
                //页面层
        layer.open({
          type: 1,
          title:'莫愁商城',
          skin: 'demo-class', //加上边框
          area: ['432px', '515px'], //宽高
          content: $('#login_form')
        });
    }


    function register()
    {
        $('#login_go').hide();
        $('#register_go').show();
        // $
    }

    function login_to()
    {
        $('#login_go').show();
        $('#register_go').hide();
    }


    function login_res()
    {
        $('#login_go_to').show();
        $('#register_go_to').hide();
    }

    function register_res()
    {
        $('#login_go_to').hide();
        $('#register_go_to').show();
        // $
    }

    // 注册一
    function go_register_to()
    {
         var formData = $("#formpost_register").serialize();
         // console.log(formData);
         $.ajax({
             type: "POST",
             url:"{:url('Login/register')}",
             data:formData,// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                console.log(msg);
                if (msg == 1) {
                    layer.msg('恭喜您，注册成功！', {icon: 1});
                    $('#login_go').show();
                    $('#register_go').hide();
                }else if(msg == 2){
                    layer.msg('注册失败，请重试');
                }else if(msg == 3){
                    layer.msg('验证码错误，请重试！');
                }
                // if (msg == 1111) {
                //     layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                //     history.go(0); 
                // }else{
                //     layer.msg('申请失败,请重新再试!');
                // }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
         
       
    }

    // 注册二
    function go_register()
    {
         var formData = $("#formpost_register_to").serialize();
         // console.log(formData);
         $.ajax({
             type: "POST",
             url:"{:url('Login/register')}",
             data:formData,// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                console.log(msg);
                if (msg == 1) {
                    layer.msg('恭喜您，注册成功！', {icon: 1});
                    $('#login_go_to').show();
                    $('#register_go_to').hide();
                }else if(msg == 2){
                    layer.msg('注册失败，请重试');
                }else if(msg == 3){
                    layer.msg('验证码错误，请重试！');
                }
                // if (msg == 1111) {
                //     layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                //     history.go(0); 
                // }else{
                //     layer.msg('申请失败,请重新再试!');
                // }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
         
       
    }


    // 验证码一
    function code(t){
        $('#go_code').disabled=true;
        
        var phone = $('#code_phone').val();
        console.log(phone);
        if (phone == '' || phone.length < 11 || phone.length > 11 || !(/^((\d{3}-\d{8}|\d{4}-\d{7,8})|(1[3|5|7|8][0-9]{9}))$/.test(phone))) {
            layer.msg('请输入正确的手机号码');
        }else{
            for(i=1;i<=t;i++) {
                window.setTimeout("update_p(" + i + ","+t+")", i * 1000);
            }

            $.ajax({
                 type: "POST",
                 url:"{:url('Login/verification')}",
                 data:{'phone':phone},// 要提交的表单 
                 beforeSend:function(){
                       layer.load(0, {shade: false});
                    },
                 success: function(msg) {
                    console.log(msg);
                    if (msg == 1) {
                        layer.msg('短信已发送', {icon: 1});
                    } else if(msg == 2){
                        layer.msg('注册失败，请重试！');
                    }else if(msg ==4){
                        layer.msg('请不要重复发送短信！');
                    }else if(msg == 5){
                        layer.msg('手机号码已存在！');
                    }
                 },
                 complete: function() {
                         layer.closeAll('loading');
                    }
             });
        }

    }
    function update_p(num,t) {
        if(num == t) {
            $('#go_code').html('获取短信验证码');
            $('#go_code').css("color","#007bbb");
            $('#go_code').disabled=false;
            $('#go_code').css("pointer-events","auto");
        }
        else {
            printnr = t-num;
            // document.myform.phone.value = " (" + printnr +")秒后重新发送";
            $('#go_code').html(" " + printnr +"秒后重新发送");
            $('#go_code').css("color","#ccc");
            $('#go_code').css("pointer-events","none");
        }
    }


    // 验证码二
    function codeto(t){
        $('#go_code_to').disabled=true;
        
        var phone = $('#code_phone_to').val();
        console.log(phone);
        if (phone == '' || phone.length < 11 || phone.length > 11 || !(/^((\d{3}-\d{8}|\d{4}-\d{7,8})|(1[3|5|7|8][0-9]{9}))$/.test(phone))) {
            layer.msg('请输入正确的手机号码');
        }else{
            for(i=1;i<=t;i++) {
                window.setTimeout("update_po(" + i + ","+t+")", i * 1000);
            }

            $.ajax({
                 type: "POST",
                 url:"{:url('Login/verification')}",
                 data:{'phone':phone},// 要提交的表单 
                 beforeSend:function(){
                       layer.load(0, {shade: false});
                    },
                 success: function(msg) {
                    console.log(msg);
                    if (msg == 1) {
                        layer.msg('短信已发送', {icon: 1});
                    } else if(msg == 2){
                        layer.msg('注册失败，请重试！');
                    }else if(msg ==4){
                        layer.msg('请不要重复发送短信！');
                    }else if(msg == 5){
                        layer.msg('手机号码已存在！');
                    }
                 },
                 complete: function() {
                         layer.closeAll('loading');
                    }
             });
        }

    }
    function update_po(num,t) {
        if(num == t) {
            $('#go_code_to').html('获取短信验证码');
            $('#go_code_to').css("color","#007bbb");
            $('#go_code_to').disabled=false;
            $('#go_code_to').css("pointer-events","auto");
        }
        else {
            printnr = t-num;
            // document.myform.phone.value = " (" + printnr +")秒后重新发送";
            $('#go_code_to').html(" " + printnr +"秒后重新发送");
            $('#go_code_to').css("color","#ccc");
            $('#go_code_to').css("pointer-events","none");
        }
    }


    // // 登入一
    function go_login(){
        var formData = $("#login_formpost").serialize();
        //  // console.log(formData);
         $.ajax({
             type: "POST",
             url:"{:url('Login/login_add')}",
             data:formData,// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                // console.log(msg);
                if (msg == 1) {
                    layer.msg('登入成功！',{icon: 1});
                    history.go(0); 
                }else if(msg == 2){
                    layer.msg('您还没有注册,请前往注册！');
                }else{
                    layer.msg('密码错误,请重新登入！');
                }
                // if (msg == 1111) {
                //     layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                //     history.go(0); 
                // }else{
                //     layer.msg('申请失败,请重新再试!');
                // }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
    }


    // 登入二
    function go_login_to(){
        var formData = $("#login_formpost_to").serialize();
         // console.log(formData);
         $.ajax({
             type: "POST",
             url:"{:url('Login/login_add')}",
             data:formData,// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                // console.log(msg);
                if (msg == 1) {
                    layer.msg('登入成功！',{icon: 1});
                    history.go(0); 
                }else if(msg == 2){
                    layer.msg('您还没有注册,请前往注册！');
                }else{
                    layer.msg('密码错误,请重新登入！');
                }
                // if (msg == 1111) {
                //     layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                //     history.go(0); 
                // }else{
                //     layer.msg('申请失败,请重新再试!');
                // }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
    }
    
    </script>
        <!-- 登入login -->
        <div id="login_form" style="background-color:#fff;display:none;">
            <div style="width:100%;">
                <div style="float:left;margin:10px 25%;">
                    <img src="__STATIC__/assets/images/LOGO.png" alt="" style="width:200px;height:45px;">
                </div>
                <div style="float:left;margin:20px -52%">
                    <h1 style="font-size:30px;text-align:center;">莫愁商城</h1>
                </div>
            </div>
            <div style="clear:both"></div>
            <div style="width:100%;">
                <h1 style="text-align:center;font-size:16px;">  一站式家具分期服务</h1>
            </div>
            <div style="width:100%;text-align:center;margin:60px auto;" id="login_go">
                <form action="" id="login_formpost" class="formpost">
                    <div style="width:100%;">
                        <input type="text" style="width:350px;" name="phone" placeholder="登入账号 / 手机号...">
                    </div>
                    <div style="width:100%;">
                        <input type="password" style="width:350px;" name="pwd" placeholder="请输入登入密码...">
                    </div>
                    <div style="width:350px;text-align:center;">
                        <a  style="float:left;font-size:16px;color:#007bbb;margin-left:11%;cursor:pointer" onclick="register()">快速注册</a>
                        
                        <a href="" style="float:right;font-size:16px;color:#007bbb;margin-right:-50px;">忘记密码？</a>
                        
                    </div>
                </form>
                <div style="width:100%;margin:48px auto;">  
                    <button type="button" class="layui-btn layui-btn-danger" style="width:350px;margin:0px 9%" onclick="go_login()">登入</button>
                </div>
            </div>
            <!-- 切换注册 -->
            <div style="width:100%;text-align:center;margin:0px auto; display:none;" id="register_go">
                <form action="" id="formpost_register" class="formpost">
                    <div style="width:100%;">
                        <input type="text" style="width:340px;" id="code_phone_to" name="phone" placeholder="请输入手机号...">
                    </div>
                    <div style="width:100%;">
                        <div style="width:422px;float:left;">
                            <input type="text" style="width:230px;" name="code" placeholder="请输入短信验证码...">
                            <a  style="color:#007bbb;cursor:pointer" id="go_code_to" onclick="codeto(10)">获取短信验证码</a>
                        </div>
                    </div>
                    <div style="clear:both"></div>
                    <div style="width:100%;">
                        <input type="password" style="width:340px;"  name="pwd" placeholder="请输入登入密码...">
                    </div>
                    <div style="clear:both"></div>
                   
                </form>
                <div style="width:100%;margin:48px auto;">
                    <button type="button" class="layui-btn layui-btn-danger" style="width:350px;margin:0px 9%" onclick="go_register_to()">注册</button>
                    <h1 style="margin:20px auto;">已有账号? <a  style="color:#007bbb;cursor:pointer" onclick="login_to()">去登入</a></h1>
                </div>

               
            </div>
            
        </div>        
        



        <!-- 注册register -->
        <div id="register_form" style="background-color:#fff;display:none;">
            <div style="width:100%;">
                <div style="float:left;margin:10px 25%;">
                    <img src="__STATIC__/assets/images/LOGO.png" alt="" style="width:200px;height:45px;">
                </div>
                <div style="float:left;margin:20px -52%">
                    <h1 style="font-size:30px;text-align:center;">莫愁商城</h1>
                </div>
            </div>
            <div style="clear:both"></div>
            <div style="width:100%;">
                <h1 style="text-align:center;font-size:16px;">  一站式家具分期服务</h1>
            </div>
            <div style="width:100%;text-align:center;margin:60px auto;display:none;" id="login_go_to">
                <form action="" id="login_formpost_to" class="formpost">
                    <div style="width:100%;">
                        <input type="text" style="width:350px;" name="phone" placeholder="登入账号 / 手机号...">
                    </div>
                    <div style="width:100%;">
                        <input type="password" style="width:350px;" name="pwd" placeholder="请输入登入密码...">
                    </div>
                    <div style="width:350px;text-align:center;">
                        <a  style="float:left;font-size:16px;color:#007bbb;margin-left:11%;cursor:pointer" onclick="register_res()">快速注册</a>
                        
                        <a href="" style="float:right;font-size:16px;color:#007bbb;margin-right:-50px;">忘记密码？</a>
                        
                    </div>
                </form>
                <div style="width:100%;margin:48px auto;">
                    <button type="button" class="layui-btn layui-btn-danger" style="width:350px;margin:0px 9%" onclick="go_login_to()">登入</button>
                </div>
            </div>
            <!-- 切换注册 -->
            <div style="width:100%;text-align:center;margin:0px auto; " id="register_go_to">
                <form action="" id="formpost_register_to" class="formpost">
                    <div style="width:100%;">
                        <input type="text" style="width:340px;" id="code_phone" name="phone" placeholder="请输入手机号...">
                    </div>
                    <div style="width:100%;">
                        <div style="width:422px;float:left;">
                            <input type="text" style="width:230px;" name="code" placeholder="请输入短信验证码...">
                            <a  style="color:#007bbb;cursor:pointer"  id="go_code" onclick="code(10)">获取短信验证码</a>
                        </div>
                        <!-- <div style="float:left;">
                            
                        </div> -->
                    </div>
                    <div style="width:100%;">
                        <input type="password" style="width:340px;"  name="pwd" placeholder="请输入登入密码...">
                    </div>
                    <div style="clear:both"></div>
                   
                </form>
                <div style="width:100%;margin:48px auto;">
                    <button type="button" class="layui-btn layui-btn-danger" style="width:350px;margin:0px 9%" onclick="go_register()">注册</button>
                    <h1 style="margin:20px auto;">已有账号? <a  style="color:#007bbb;cursor:pointer" onclick="login_res()">去登入</a></h1>
                </div>

               
            </div>
            
        </div>        

<!--     <div class="head_left">
        <div>
            <p>购物指南</p>
            <ul>
                <li><a id="head_left_a1" href="../sjdinggou/sjdinggou.html">· 订购流程</a></li>
                <li><a id="head_left_a2" href="../sjzhifu/sjzhifu.html">· 支付方式</a></li>
            </ul>
        </div>
        <div>
            <p>购物保障</p>
            <ul>
                <li><a id="head_left_a3" href="../sjpinpai/sjpinpai.html">· 品牌保障</a></li>
                <li><a id="head_left_a4" href="../sjzhuce/sjzhuce.html">· 注册协议</a></li>
                <li><a id="head_left_a5" href="../sjyinsi/sjyinsi.html">· 隐私保护</a></li>
            </ul>
        </div>
        <div>
            <p>常见问题</p>
            <ul>
                <li><a id="head_left_a6" href="../sjyanhuo/sjyanhuo.html">· 验货签收</a></li>
                <li><a id="head_left_a7" href="../sjshouhuo/sjshouhuo.html">· 交货方式</a></li>
                <li><a id="head_left_a8" href="../sjtuihuo/sjtuihuo.html">· 退货说明</a></li>
            </ul>
        </div>
    </div>
 -->

